1. Field of the Invention
The present invention relates to methods of determining and recognizing the type of a code included in image data, and, more particularly, to a method of determining not only a one-dimensional code and a two-dimensional code but also a steganographic code with certainty.
2. Description of the Related Art
Recently, two-dimensional codes into which more information can be embedded compared with one-dimensional codes have been widely used. Since a two-dimensional code cannot be recognized without using data on the entire two-dimensional array of the code, an image reader such as a digital camera or an image scanner is used as a reader for the two-dimensional code. Furthermore, an image reader that automatically recognizes both one-dimensional codes and two-dimensional codes has been commercialized. Thus, various code reading techniques have been proposed.
For example, there is a technique in which image data is partitioned into units of rectangular blocks and it is determined whether the image features of a rectangular block unit area satisfy given conditions by scanning to determine whether the rectangular block unit area exists in a code area of a specified type. This technique is proposed in Japanese Unexamined Patent Application Publication No. 2005-173646.
In addition, for example, steganography in which data is invisibly embedded into an image has been brought into active use. Steganography is a technique in which image data is divided into a plurality of unit areas, and codes are embedded into an image on the basis of a magnitude relationship between the unit areas in terms of a feature value such as an average density. The features of an image generated using the technique is different from those of a one-dimensional or two-dimensional code. This technique is proposed in Japanese Unexamined Patent Application Publication No. 2004-349879
In the above-described known methods, as shown in FIG. 1, since code area determination was performed on the basis of the image features of a one-dimensional code (the level of line correlation is high, and there are always edges in one direction) and the image features of a two-dimensional code (there are edges in vertical and horizontal directions, and a black pixel ratio is 50%), in the case of the steganographic code having different features from those of the one-dimensional and two-dimensional codes, code area determination could not be performed. Accordingly, in order to recognize the steganographic code, recognition processing was required to be started from a specified area regardless of whether the steganographic, code area was included in image data. This resulted in a long processing time and a recognition failure. In addition, a user had to explicitly specify a steganographic code area, therefore, the methods were very inconvenient.